home *** CD-ROM | disk | FTP | other *** search
- Program EX_0301;
- {Listing 4P - see documentation in TUTOR.SSS}
-
- uses SSS;
- { For Pascal other than Turbo/Quick erase above line }
-
- const
- FREE=0;
- BUSY=1;
-
- { For MS Pascal $include:'SSSP1.H' }
-
- { For MS Pascal $include:'SSSP2.H' }
-
- function rnx(m, s: real): real;
- var x : real;
- begin
- repeat
- x := RN(m, s);
- until x > 0.0;
- rnx := x;
- end;
-
- procedure prime;
- begin
- INIQUE(0,0,1);
- INISTA(1,'Busy fraction',1,0,0,0);
- TALLY(1,FREE);
- SETT(rnx(7, 4));
- TALLY(1,BUSY);
- end;
-
- begin
- prime;
-
- repeat
- if RA < 0.25 then SETT(T+ER(2,2)) else
- SETT(T+TR(1,3,4));
- TALLY(1,FREE);
- SETT(T+rnx(7, 4));
- TALLY(1,BUSY);
- until T >= 120;
-
- SUMRY('');
- end.
-